home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-24 | 11.8 KB | 517 lines | [TEXT/CCL ] |
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; Dan Suthers 24-Jun-90 23:48:18
- ;;; Load this to see the grapher's capabilities in graphing hierarcies.
- ;;; The file defines some bogus SM structures simulating a frame hierarchy,
- ;;; then uses SM-OBJECTS->GRAPH-VIEW to graph them several ways (see the
- ;;; end of the file for this and an optional additional demo.)
-
- (in-package "USER")
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; These "frames" will be used to graph an "inheritance hierarchy"
- ;;; various ways.
-
- (sm:dst (DEMO-FRAME
- (:comments "
- Bogus 'frames' in an 'inheritance hierarchy', just for the purpose
- of demonstrating grapher capabilities.")
- (:redefine t)
- (:sort-instances t))
- (subclasses nil :type list))
-
- (DEMO-FRAME <-SUBSUMPTION
- :SUBCLASSES nil)
-
- (DEMO-FRAME >-SUBSUMPTION
- :SUBCLASSES nil)
-
- (DEMO-FRAME ABSTRACTION
- :SUBCLASSES (mathematical-concept epistemic-concept physical-law process-concept))
-
- (DEMO-FRAME ALUMINUM
- :SUBCLASSES nil)
-
- (DEMO-FRAME ATOM
- :SUBCLASSES nil)
-
- (DEMO-FRAME ATTRIBUTIVE
- :SUBCLASSES (made-of))
-
- (DEMO-FRAME BINARY-EXPRESSION
- :SUBCLASSES
- (binary-expression-4 binary-expression-6 binary-expression-2
- binary-expression-5 binary-expression-1 binary-expression-8
- binary-expression-3 binary-expression-7))
-
- (DEMO-FRAME BINARY-EXPRESSION-1
- :SUBCLASSES nil)
-
- (DEMO-FRAME BINARY-EXPRESSION-2
- :SUBCLASSES nil)
-
- (DEMO-FRAME BINARY-EXPRESSION-3
- :SUBCLASSES nil)
-
- (DEMO-FRAME BINARY-EXPRESSION-4
- :SUBCLASSES nil)
-
- (DEMO-FRAME BINARY-EXPRESSION-5
- :SUBCLASSES nil)
-
- (DEMO-FRAME BINARY-EXPRESSION-6
- :SUBCLASSES nil)
-
- (DEMO-FRAME BINARY-EXPRESSION-7
- :SUBCLASSES nil)
-
- (DEMO-FRAME BINARY-EXPRESSION-8
- :SUBCLASSES nil)
-
- (DEMO-FRAME CAUSALITY
- :SUBCLASSES nil)
-
- (DEMO-FRAME CHANGING
- :SUBCLASSES nil)
-
- (DEMO-FRAME CHARGE
- :SUBCLASSES (negative-charge positive-charge charge-of-a-capacitor))
-
- (DEMO-FRAME CHARGE-CURRENT-LAW
- :SUBCLASSES nil)
-
- (DEMO-FRAME CHARGE-OF-A-CAPACITOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME CLORINE
- :SUBCLASSES nil)
-
- (DEMO-FRAME COMPARATIVE
- :SUBCLASSES (identity distinction))
-
- (DEMO-FRAME COMPOUND
- :SUBCLASSES (water))
-
- (DEMO-FRAME CONCEPT-ASSOCIATION
- :SUBCLASSES (current-through-a-capacitor voltage-across-capacitor charge-of-a-capacitor))
-
- (DEMO-FRAME CONDITIONAL
- :SUBCLASSES nil)
-
- (DEMO-FRAME CONDITIONALITY
- :SUBCLASSES nil)
-
- (DEMO-FRAME CONDUCTOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME CONSCIOUS-BEING
- :SUBCLASSES (person))
-
- (DEMO-FRAME CONSTANT
- :SUBCLASSES nil)
-
- (DEMO-FRAME CONSTRAINT
- :SUBCLASSES nil)
-
- (DEMO-FRAME COPPER
- :SUBCLASSES nil)
-
- (DEMO-FRAME CURRENT
- :SUBCLASSES (current-through-a-capacitor))
-
- (DEMO-FRAME CURRENT-THROUGH-A-CAPACITOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME DECOMPOSABLE-OBJECT
- :SUBCLASSES (molecule atom ordered-object device element compound))
-
- (DEMO-FRAME DEVICE
- :SUBCLASSES (electronic-device storage-device measuring-device))
-
- (DEMO-FRAME DISTINCTION
- :SUBCLASSES nil)
-
- (DEMO-FRAME EE-DEVELOPER-0
- :SUBCLASSES nil)
-
- (DEMO-FRAME EE-DEVELOPER-1
- :SUBCLASSES nil)
-
- (DEMO-FRAME EE-DEVELOPER-2
- :SUBCLASSES nil)
-
- (DEMO-FRAME ELECTRICITY
- :SUBCLASSES nil)
-
- (DEMO-FRAME ELECTRONIC-DEVICE
- :SUBCLASSES nil)
-
- (DEMO-FRAME ELEMENT
- :SUBCLASSES (sodium iron gallium silicon oxygen aluminum hydrogen copper clorine))
-
- (DEMO-FRAME ENTITY
- :SUBCLASSES (process object quality relation))
-
- (DEMO-FRAME EPISTEMIC-CONCEPT
- :SUBCLASSES (measurement concept-association))
-
- (DEMO-FRAME EQUIVALENCE
- :SUBCLASSES
- (equivalence-4 equivalence-2 equivalence-5 equivalence-1 equivalence-6
- equivalence-7 equivalence-3))
-
- (DEMO-FRAME EQUIVALENCE-1
- :SUBCLASSES nil)
-
- (DEMO-FRAME EQUIVALENCE-2
- :SUBCLASSES nil)
-
- (DEMO-FRAME EQUIVALENCE-3
- :SUBCLASSES nil)
-
- (DEMO-FRAME EQUIVALENCE-4
- :SUBCLASSES nil)
-
- (DEMO-FRAME EQUIVALENCE-5
- :SUBCLASSES nil)
-
- (DEMO-FRAME EQUIVALENCE-6
- :SUBCLASSES nil)
-
- (DEMO-FRAME EQUIVALENCE-7
- :SUBCLASSES nil)
-
- (DEMO-FRAME EVENT
- :SUBCLASSES nil)
-
- (DEMO-FRAME EVIDENTIAL
- :SUBCLASSES (evidential-con evidential-pro))
-
- (DEMO-FRAME EVIDENTIAL-CON
- :SUBCLASSES nil)
-
- (DEMO-FRAME EVIDENTIAL-PRO
- :SUBCLASSES nil)
-
- (DEMO-FRAME EXPRESSION
- :SUBCLASSES (constant parameter binary-expression variable equivalence))
-
- (DEMO-FRAME FORCE
- :SUBCLASSES nil)
-
- (DEMO-FRAME FUNCTION
- :SUBCLASSES nil)
-
- (DEMO-FRAME FUNCTIONAL
- :SUBCLASSES nil)
-
- (DEMO-FRAME FUNCTIONAL-OBJECT
- :SUBCLASSES (device plate))
-
- (DEMO-FRAME GALLIUM
- :SUBCLASSES nil)
-
- (DEMO-FRAME HAS-PART
- :SUBCLASSES nil)
-
- (DEMO-FRAME HYDROGEN
- :SUBCLASSES nil)
-
- (DEMO-FRAME IDENTIFICATION
- :SUBCLASSES nil)
-
- (DEMO-FRAME IDENTITY
- :SUBCLASSES nil)
-
- (DEMO-FRAME INDUCTANCE
- :SUBCLASSES nil)
-
- (DEMO-FRAME INSULATOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME INTENSIONAL-QUALITY
- :SUBCLASSES (function))
-
- (DEMO-FRAME IRON
- :SUBCLASSES nil)
-
- (DEMO-FRAME LOCATION
- :SUBCLASSES nil)
-
- (DEMO-FRAME MADE-OF
- :SUBCLASSES nil)
-
- (DEMO-FRAME MATERIAL-PROCESS
- :SUBCLASSES nil)
-
- (DEMO-FRAME MATERIAL-WORLD-QUALITY
- :SUBCLASSES (current charge voltage power force resistance inductance))
-
- (DEMO-FRAME MATHEMATICAL-CONCEPT
- :SUBCLASSES (operator))
-
- (DEMO-FRAME MEASUREMENT
- :SUBCLASSES nil)
-
- (DEMO-FRAME MEASURING-DEVICE
- :SUBCLASSES nil)
-
- (DEMO-FRAME MENTAL-PROCESS
- :SUBCLASSES nil)
-
- (DEMO-FRAME MODAL-QUALITY
- :SUBCLASSES (nonconditional conditional volitional nonvolitional))
-
- (DEMO-FRAME MODULARITY
- :SUBCLASSES (conditionality stasis changing causality))
-
- (DEMO-FRAME MOLECULE
- :SUBCLASSES nil)
-
- (DEMO-FRAME NECESSITY
- :SUBCLASSES nil)
-
- (DEMO-FRAME NEGATIVE-CHARGE
- :SUBCLASSES nil)
-
- (DEMO-FRAME NON-CONSCIOUS-ENTITY
- :SUBCLASSES nil)
-
- (DEMO-FRAME NONCONDITIONAL
- :SUBCLASSES nil)
-
- (DEMO-FRAME NONDECOMPOSABLE-OBJECT
- :SUBCLASSES (space-point time-point substance))
-
- (DEMO-FRAME NONVOLITIONAL
- :SUBCLASSES (necessity possibility))
-
- (DEMO-FRAME OBJECT
- :SUBCLASSES
- (abstraction non-conscious-entity spatial-temporal-entity
- nondecomposable-object conscious-being decomposable-object))
-
- (DEMO-FRAME OHMS-LAW
- :SUBCLASSES nil)
-
- (DEMO-FRAME OPERATOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME ORDERED-OBJECT
- :SUBCLASSES nil)
-
- (DEMO-FRAME OXYGEN
- :SUBCLASSES nil)
-
- (DEMO-FRAME PARAMETER
- :SUBCLASSES (parameter-c))
-
- (DEMO-FRAME PARAMETER-C
- :SUBCLASSES nil)
-
- (DEMO-FRAME PART-OF
- :SUBCLASSES nil)
-
- (DEMO-FRAME PERSON
- :SUBCLASSES (ee-developer-2 ee-developer-1 ee-developer-0))
-
- (DEMO-FRAME PHYSICAL-LAW
- :SUBCLASSES (charge-current-law power-law-dc ohms-law))
-
- (DEMO-FRAME PLATE
- :SUBCLASSES nil)
-
- (DEMO-FRAME POSITIVE-CHARGE
- :SUBCLASSES nil)
-
- (DEMO-FRAME POSSIBILITY
- :SUBCLASSES nil)
-
- (DEMO-FRAME POWER
- :SUBCLASSES nil)
-
- (DEMO-FRAME POWER-LAW-DC
- :SUBCLASSES nil)
-
- (DEMO-FRAME PREDICATE
- :SUBCLASSES
- (evidential comparative attributive subsumption structural modularity
- functional teleological constraint identification))
-
- (DEMO-FRAME PROCESS
- :SUBCLASSES (material-process mental-process verbal-process storage-process))
-
- (DEMO-FRAME PROCESS-CONCEPT
- :SUBCLASSES (storage state-transition state))
-
- (DEMO-FRAME QUALITY
- :SUBCLASSES (material-world-quality intensional-quality modal-quality))
-
- (DEMO-FRAME RELATION
- :SUBCLASSES (expression predicate))
-
- (DEMO-FRAME RESISTANCE
- :SUBCLASSES nil)
-
- (DEMO-FRAME SILICON
- :SUBCLASSES nil)
-
- (DEMO-FRAME SODIUM
- :SUBCLASSES nil)
-
- (DEMO-FRAME SPACE-POINT
- :SUBCLASSES nil)
-
- (DEMO-FRAME SPATIAL-TEMPORAL-ENTITY
- :SUBCLASSES
- (molecule atom ordered-object functional-object compound time event substance
- person location element))
-
- (DEMO-FRAME STASIS
- :SUBCLASSES nil)
-
- (DEMO-FRAME STATE
- :SUBCLASSES nil)
-
- (DEMO-FRAME STATE-TRANSITION
- :SUBCLASSES nil)
-
- (DEMO-FRAME STORAGE
- :SUBCLASSES nil)
-
- (DEMO-FRAME STORAGE-DEVICE
- :SUBCLASSES nil)
-
- (DEMO-FRAME STORAGE-PROCESS
- :SUBCLASSES nil)
-
- (DEMO-FRAME STRUCTURAL
- :SUBCLASSES (has-part structural-association part-of))
-
- (DEMO-FRAME STRUCTURAL-ASSOCIATION
- :SUBCLASSES nil)
-
- (DEMO-FRAME SUBATOMIC-PARTICLE
- :SUBCLASSES nil)
-
- (DEMO-FRAME SUBSTANCE
- :SUBCLASSES (subatomic-particle electricity insulator conductor))
-
- (DEMO-FRAME SUBSUMPTION
- :SUBCLASSES (>-subsumption <-subsumption))
-
- (DEMO-FRAME TELEOLOGICAL
- :SUBCLASSES nil)
-
- (DEMO-FRAME TIME
- :SUBCLASSES nil)
-
- (DEMO-FRAME TIME-POINT
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE
- :SUBCLASSES
- (variable-p variable-t variable-q variable-i variable-v variable-r
- variable-v-across-capacitor variable-c variable-i-across-capacitor))
-
- (DEMO-FRAME VARIABLE-C
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-I
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-I-ACROSS-CAPACITOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-P
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-Q
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-R
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-T
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-V
- :SUBCLASSES nil)
-
- (DEMO-FRAME VARIABLE-V-ACROSS-CAPACITOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME VERBAL-PROCESS
- :SUBCLASSES nil)
-
- (DEMO-FRAME VOLITIONAL
- :SUBCLASSES nil)
-
- (DEMO-FRAME VOLTAGE
- :SUBCLASSES (voltage-across-capacitor voltage-1 voltage-2))
-
- (DEMO-FRAME VOLTAGE-1
- :SUBCLASSES nil)
-
- (DEMO-FRAME VOLTAGE-2
- :SUBCLASSES nil)
-
- (DEMO-FRAME VOLTAGE-ACROSS-CAPACITOR
- :SUBCLASSES nil)
-
- (DEMO-FRAME WATER
- :SUBCLASSES nil)
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (oneof grapher:*graph-window*
- :graph-view (grapher:sm-type->graph-view
- 'demo-frame 'subclasses '(entity)
- t ':radial ':reduce-crossings 2 nil
- #'symbol-name)
- :window-size (make-point 500 400)
- :window-position (make-point 2 (+ 2 *menubar-bottom*))
- :window-title "Radial Style")
-
- (oneof grapher:*graph-window*
- :graph-view (grapher:sm-type->graph-view
- 'demo-frame 'subclasses '(entity)
- t ':vertical-tree ':reduce-crossings 2 nil
- #'symbol-name)
- :window-size (make-point 500 300)
- :window-position (make-point 22 (+ 22 *menubar-bottom*))
- :window-title "Vertical-Tree Style")
-
- (oneof grapher:*graph-window*
- :graph-view (grapher:sm-type->graph-view
- 'demo-frame 'subclasses '(entity)
- t ':horizontal-tree ':reduce-crossings 2 nil
- #'symbol-name)
- :window-size (make-point 500 300)
- :window-position (make-point 42 (+ 42 *menubar-bottom*))
- :window-title "Horizontal-Tree Style")
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; The following is an ugly interconnected graph that I used to test
- ;;; the grapher on graphs with backlinks, cycles, etc. (i.e., general
- ;;; graphs, not trees). Evaluate this if you want to see how it does.
- #|
- (progn
- (sm:dst CIRCULAR-REFERENCES
- pointer)
- (circular-references A :pointer (b c))
- (circular-references B :pointer (d e))
- (circular-references C :pointer (e))
- (circular-references D :pointer (g h))
- (circular-references E :pointer (f))
- (circular-references F :pointer nil)
- (circular-references G :pointer (b))
- (circular-references H :pointer (a))
- (grapher:graph-sm-objects 'circular-references 'pointer '(a)
- t :horizontal-tree :reduce-crossings 5)
- )
- |#
-
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; EOF
-